<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>喧喧</title>
    <script>
      (function() {
        if (!process.env.HOT) {
          const link = document.createElement('link');
          link.rel = 'stylesheet';
          link.href = './dist/style.css';
          // HACK: Writing the script path should be done with webpack
          document.getElementsByTagName('head')[0].appendChild(link);
        }
      }());
    </script>
  </head>
  <body>
    <div class="spinner-main" id="loading">
      <div class="dot1"></div><div class="dot2"></div>
    </div>
    <div id="appContainer" class="fix-full"></div>
    <script>
      {
        const script = document.createElement('script');
        const port = process.env.PORT || 3000;
        script.src = (process.env.HOT)
          ? 'http://localhost:' + port + '/dist/bundle.js'
          : './dist/bundle.js';
        // HACK: Writing the script path should be done with webpack
        document.body.appendChild(script);
      }
    </script>
  </body>
</html>
